package com.ruoyi.mywork.repository.generator.mapper;

import com.ruoyi.mywork.repository.generator.entity.LocationReportRecord;
import com.ruoyi.mywork.repository.generator.entity.LocationReportRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface LocationReportRecordMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_report_record
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @SelectProvider(type=LocationReportRecordSqlProvider.class, method="countByExample")
    long countByExample(LocationReportRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_report_record
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @DeleteProvider(type=LocationReportRecordSqlProvider.class, method="deleteByExample")
    int deleteByExample(LocationReportRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_report_record
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @Delete({
        "delete from location_report_record",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_report_record
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @Insert({
        "insert into location_report_record (user_id, latitude, ",
        "longitude, report_time, ",
        "ctime)",
        "values (#{userId,jdbcType=BIGINT}, #{latitude,jdbcType=DOUBLE}, ",
        "#{longitude,jdbcType=DOUBLE}, #{reportTime,jdbcType=TIMESTAMP}, ",
        "#{ctime,jdbcType=TIMESTAMP})"
    })
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Long.class)
    int insert(LocationReportRecord row);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_report_record
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @InsertProvider(type=LocationReportRecordSqlProvider.class, method="insertSelective")
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Long.class)
    int insertSelective(LocationReportRecord row);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_report_record
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @SelectProvider(type=LocationReportRecordSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
        @Result(column="latitude", property="latitude", jdbcType=JdbcType.DOUBLE),
        @Result(column="longitude", property="longitude", jdbcType=JdbcType.DOUBLE),
        @Result(column="report_time", property="reportTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="ctime", property="ctime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<LocationReportRecord> selectByExample(LocationReportRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_report_record
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @Select({
        "select",
        "id, user_id, latitude, longitude, report_time, ctime",
        "from location_report_record",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
        @Result(column="latitude", property="latitude", jdbcType=JdbcType.DOUBLE),
        @Result(column="longitude", property="longitude", jdbcType=JdbcType.DOUBLE),
        @Result(column="report_time", property="reportTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="ctime", property="ctime", jdbcType=JdbcType.TIMESTAMP)
    })
    LocationReportRecord selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_report_record
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @UpdateProvider(type=LocationReportRecordSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("row") LocationReportRecord row, @Param("example") LocationReportRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_report_record
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @UpdateProvider(type=LocationReportRecordSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("row") LocationReportRecord row, @Param("example") LocationReportRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_report_record
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @UpdateProvider(type=LocationReportRecordSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(LocationReportRecord row);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_report_record
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @Update({
        "update location_report_record",
        "set user_id = #{userId,jdbcType=BIGINT},",
          "latitude = #{latitude,jdbcType=DOUBLE},",
          "longitude = #{longitude,jdbcType=DOUBLE},",
          "report_time = #{reportTime,jdbcType=TIMESTAMP},",
          "ctime = #{ctime,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(LocationReportRecord row);
}